package com.objetdirect.gwt.umldrawer.client;

import com.gwtext.client.data.Node;
import com.gwtext.client.widgets.tree.TreeNode;
import com.gwtext.client.widgets.tree.TreePanel;

class ProjectsTree extends TreePanel {
	
	private static TreeNode root = new TreeNode("Projects Heirarchy");
	
	public TreeNode getProjectsTree() {
		
		root = new TreeNode("Projects Heirarchy");
		Node [] nodes = root.getChildNodes() ;
		for (Node node : nodes) {
			node.remove() ;
		}
		
		TreeNode one = new TreeNode("Project");
		one.setChecked(false);
		one.setAttribute("projectId", "111");
		one.setIcon("images/projects2.png");
		root.appendChild(one);
		
		setRootNode(root);
		return root ;
	}
}